package com.memo4android.model;

public class ItemNote extends Item implements Comparable<ItemNote> {

	private String content;
	private Dossier parent;
	
	public ItemNote(Dossier parent, String titre, String texte) {
		super(titre);
		content = texte;
		this.parent = parent;
	}

	public Dossier getParent() {
		return parent;
	}

	public void setParent(Dossier parent) {
		this.parent = parent;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int compareTo(ItemNote another) {
		int res = this.getDateCreation().compareTo(another.getDateCreation());
		if(res == 0)
			res = this.getTitre().compareTo(another.getTitre());
		return res;
	}

}